package com.sinosoft.emplmis.jobless.service;

import java.util.List;

import org.apache.log4j.Logger;

import com.sinosoft.emplmis.jobless.entity.KnryAidrecordEntity;
import com.sinosoft.emplmis.jobless.manager.KnryAidrecordManager;
import com.sinosoft.emplmis.jobless.web.dto.JoblessSearchData;

public class KnryAidrecordService {

	private KnryAidrecordManager knryAidrecordManager;

	public KnryAidrecordManager getKnryAidrecordManager() {
		return knryAidrecordManager;
	}

	public void setKnryAidrecordManager(KnryAidrecordManager knryAidrecordManager) {
		this.knryAidrecordManager = knryAidrecordManager;
	}
	
	public List<KnryAidrecordEntity> selectAll(JoblessSearchData data,String unemployedId){
		return knryAidrecordManager.selectAll(data,unemployedId);	
	}
	
	public int insert(KnryAidrecordEntity Entity) {
		return knryAidrecordManager.insert(Entity);
	}
	
	public int deleteByPrimaryKey(String id){
		return knryAidrecordManager.deleteByPrimaryKey(id);
	}
	
	public KnryAidrecordEntity selectByPrimaryKey(String id){
		return knryAidrecordManager.selectByPrimaryKey(id);	
	}
	
	public int updateByPrimaryKey(KnryAidrecordEntity record) {
		return knryAidrecordManager.updateByPrimaryKey(record);
	}
	
	/**
	  * 获取总条目数
	  * @param data
	  * @return
	  */
	public int count(String unemployedId){
		Logger.getRootLogger().info("获取总条目数");
	    return knryAidrecordManager.count(unemployedId);
    }
}
